package com.killer.sqlSession;

import com.killer.pojo.Configuration;

public class DefaultSqlSessionFactory implements SqlSessionFactory{

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        //sqlSession的构造需要一个configuration对象，因此这里需要传入
        SqlSession sqlSession=new DefaultSqlSession(configuration);
        return sqlSession;
    }
}
